1. Field of the Invention
The present invention relates to an image processing apparatus, an image forming apparatus, an image processing method, a computer program and a computer-readable medium for surely extracting a foreground pixel from input image data when performing a process, such as image compression based on a layer segmentation.
2. Description of Related Art
Conventionally, it is well known about an image forming apparatus, such as a copying machine or a multi-function printer, which performs an image formation by an electrographic method, an inkjet method or the like. In addition, a recent multi-function printer is increasingly sophisticated, and there are needs for a function of saving electronic data of a document read by a scanner and managing the saved document file, a function of sending document data as an e-mail, and the like. A document scanned by a scanner is saved as image data. However, the volume of such image data is generally large. Thus, it is necessary for saving or sending such image data to utilize, for example, an image compression technique that reduces the data volume.
There is a compression technique based on the layer segmentation, for example, mixed raster content (MRC) as one of image compression techniques that implement high compression rates. This compression technique segments an image regarding input image data into two image data: image data of the foreground layer; and image data of the background layer, and performs image-data compression for the foreground layer in a condition suitable to the foreground layer and image-data compression for the background layer in a condition suitable to the background layer. Thus, it is possible to enhance a compression rate of the final compressed image. The foreground layer shows an image configured with a text character and/or a line art (hereinafter referred to as “written thing”), and the compression of the foreground layer is suitable to a lossless-compression technique, such as a joint bi-level image experts group (JBIG), a modified modified read (MMR) or a lempel ziv welch (LZW). The background layer shows an image configured without the written thing, and the compression of the background layer is suitable to a lossy-compression technique, such as a joint photographic experts group (JPEG).
Patent Document 1 (Japanese Patent Application Laid-Open No. 2005-20227) proposes an image compression apparatus having an object to compress, with a high compression rate, of image data obtained by reading a color document whose image is configured with a text character, a picture image and/or the like, but without reducing the visibility of the text character and/or the like. The proposed image compression apparatus checks a drawing condition of pixels configuring a drawn thing, such as a text character and/or graphics, on image data regarding an image of color document read by a scanner or the like, and extracts a sequential-pixel group that is a mass of sequential pixels configured with drawn pixels sequentially connected to each other. The image compression apparatus categorizes features of pixels configuring the extracted sequential-pixel group into a foreground image suitable to a compression technique preferring a resolution and a background image suitable to a compression technique preferring a color-tone characteristic, and compresses each image by a suitable compression technique.